package com.sanji.pay.pay.service;

import com.sanji.pay.pay.dto.PayDeal;
import com.sanji.pay.pay.entity.PayOrder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by cbh on 2017/8/29.
 */
public interface PayOrderService {
  PayOrder findByPayNumber(String payNum);

  void save(PayOrder payOrder);

  PayOrder findByOrderNum(String orderNum);

  PayOrder findByOrderNumAndSourceType(String orderNum, String sourceType);

  /**
   * 回调客户端
   * @param payDeal
   * @throws InterruptedException
   */
  String callbackToClient(PayDeal payDeal,String sourceType);

  PayDeal queryPayOrder(String orderNum);

  Page<PayOrder> findAll(String cusId, String startTime, String endTime, String payNum, String orderNum, String dealType, Integer status, Pageable pageable);

  List<PayOrder> findAllByExport(String cusId, String startTime, String endTime);
}
